﻿@model Senbo.Areas.Admin.Models.ViewDatas.Category_IndexViewData
@{
    ViewBag.Title = "Index";
}

@section HeaderContent{
    <script type="text/javascript">
        function deleteItem(id) {
            if (!confirm("确定要删除吗？删除后将无法删除？")) {
                return;
            }
            $("#deleteId").val(id);
            $("#delete_form").submit();
        }
    </script>
}
<div class="content-box-header">
    <h3>
        类别</h3>
    <ul class="content-box-tabs">
        <li><a href="#tab1" class="default-tab">类别列表</a></li>
        <li><a href="@Url.Action("Edit", "Category")">新增类别</a></li>
    </ul>
    <div class="clear">
    </div>
</div>
<div class="content-box-content">
    <div class="tab-content default-tab" id="tab1">
        <table>
            <thead>
                <tr>
                    <th>
                        ID
                    </th>
                    <th>
                        名称
                    </th>
                    <th>
                        添加时间
                    </th>
                    <th>
                        操作
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model.CategoryList)
                {
                    <tr>
                        <td>@item.Id
                        </td>
                        <td>
                            <a href="@Url.Action("Edit", "Category", new { id = item.Id })" title="名称">@item.Name</a>
                        </td>
                        <td>@item.AddTime.ToString()
                        </td>
                        <td>
                            <a href="@Url.Action("Edit", "Category", new { id = item.Id })" title="修改">
                                <img src="/Areas/Admin/Images/icons/pencil.png" alt="修改" /></a> <a href="javascript:void(0)" title="删除" onclick="deleteItem('@item.Id')">
                                    <img src="/Areas/Admin/Images/icons/cross.png" alt="删除" /></a>
                        </td>
                    </tr>

                }
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="4">
                        @*@Html.Raw((Html.PagerBar(Model.ClientList, new PagerBarSettings(Url.Action("Index", "Client", new { pageIndex = "{0}" })) { NoRecordTip = "尚无用户记录" })))*@
                    </td>
                </tr>
            </tfoot>
        </table>
    </div>
</div>
@*@using (Html.BeginForm("Delete", "Client", method: FormMethod.Post, id: "delete_form"))
{
    @Html.Hidden("Id", null, id: "deleteId")
}*@